In digital data devices it is common to provide a hardware implemented "compare mask" instruction for the benefit of the software user. In implementing such a compare mask function, certain specified bits in two object words are compared with each other, the specified bits being dependent upon the bit permutations set in a separate mask register. In these prior art schemes, the results of the comparison for those certain bits are then transferred to a result register in the same exact bit positions or order of significance as had been maintained in the original object words. This result is then available for further software operations. However, if the bits of predetermined binary significance in the mask register are not contiguous, or right justified, further software operations must be performed if it is desired to collect the resultant compared bits in a contiguous pattern.